chars = 0
chars += len('hundred') * 900
chars += len('and') * 891
chars += len('ten') * 10
chars += len('twentythirtyfortyfiftysixtyseventyeightyninety') * 100
chars += len('onetwothreefourfivesixseveneightnine') * 190
chars += len('eleventwelvethirteenfourteenfifteensixteenseventeeneighteennineteen') * 10
chars += len('onethousand')
print(chars)